﻿using Microsoft.Reporting.WinForms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DAL;
using BLL;

namespace PhongMachTu.Report
{
    public partial class frmPhieuKhamBenh : Form
    {
        public frmPhieuKhamBenh()
        {
            InitializeComponent();
        }
        public int maBenhNhan;
        public int maKhamBenh;
        KhambenhBLL bllKB = new KhambenhBLL();

        public string hoTen;
        public string ngayKham;
        public string trieuChung;
        public string loaiBenh;
        public string tienKham ;
        public string tienThuoc ;
        public string tongTien ;
        ChiTietKhamBenhBLL bllCTKhamBenh = new ChiTietKhamBenhBLL();
        private void frmPhieuKhamBenh_Load(object sender, EventArgs e)
        {

            IList<ReportParameter> param = new List<ReportParameter>();
            param.Add(new ReportParameter("HoTen", hoTen));    
            param.Add(new ReportParameter("NgayKham", DateTime.Now.ToShortDateString()));
            param.Add(new ReportParameter("TrieuTrung", trieuChung));
            param.Add(new ReportParameter("LoaiBenh", loaiBenh));
            param.Add(new ReportParameter("tienKham", tienKham));
            param.Add(new ReportParameter("tienThuoc", tienThuoc));
            param.Add(new ReportParameter("tongTien", tongTien));
            reportViewer1.LocalReport.SetParameters(param);

            CHITIETKHAMBENHBindingSource.DataSource = bllCTKhamBenh.LayDSThuocTheoPKB(maKhamBenh);
            this.reportViewer1.RefreshReport();


        }
    }
}
